<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreatePaymentAddressesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('payment_addresses', function (Blueprint $table) {
            $table->id();
            $table->string('address')->default('')->comment('出款地址');
            $table->string('key')->default('')->comment('私钥');
            $table->unsignedInteger('upper')->default(0)->comment('上限');
            $table->unsignedInteger('lower')->default(0)->comment('下限');
            $table->unsignedInteger('number')->default(0)->comment('出款次数');
            $table->unsignedDecimal('total', 20, 4)->default(0)->comment('已出款');
            $table->boolean('status')->default(true)->comment('状态');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('payment_addresses');
    }
}
